POV-Ray : Newsgroups : povray.unofficial.patches : Idea for functions : Re: Idea for functions Server Time
2 Sep 2024 06:16:39 EDT (-0400)
  Re: Idea for functions  
From: pk
Date: 5 May 2000 16:48:43
Message: <391333B4.E567C11F@videotron.ca>
Chris Huff wrote:
> 
> In article <3912a80f@news.povray.org>, Warp <war### [at] tagpovrayorg>
> wrote:
> 
> > How about adding support for variables, conditionals (if) and loops
> > (while) to functions (used in isosurfaces, pigments...)?
> > This would enhance a lot the possibilities of the functions. It would
> > allow, for example, making a Mandelbrot pattern function.
> 
> There is already an if() "statement", it is a function. As I remember,
> the syntax is like this: if(CONDITION, IF_VAL, ELSE_VAL)
> Support for variables and other flow control would be very useful, but I
> suspect it would require rewriting a large portion of the function code.
> I don't understand much of it though, I could be wrong.
Oh, well... You could probably do a Basic interpreter(not gwbasic...
QBasic would be good...)... It's got fast results, is turing complete,
not hard to learn, and isn't too hard to interpret, if you drop all
unneeded functions...
Or, you could also allow system calls... (function(system("/[whatever]",
x))

Both would work, but a basic interpreter is completely portable...
--
AKA paul_virak_khuong at yahoo.com, pkhuong at deja.com, pkhuong at
crosswinds.net and pkhuong at technologist.com(list not complete)...


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.